package com.xquant.marketdata.curvestrip.mapper;

import com.xquant.marketdata.curvestrip.domain.IrCurveSetDTO;
import com.xquant.marketdata.curvestrip.entity.IrCurveDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author ershuai.zhao
 */
@Repository
public interface IrCurveStripMapper {
    /**
     * @param map
     * @method queryIrCurveByPage
     * @desc 查询利率曲线
     */
    List<IrCurveSetDTO> queryIrCurveByPage(Map map);

    List<IrCurveSetDTO>  queryIrCurveCombox(Map map);

    List<Map> queryIrCurveRefSetByPage(Map map);

    List<Map> queryIrCurveRatesByPage(Map map);

    void updateIrCurve(Map map);

    void insertIrCurve(Map map);

    void deleteIrCurve(Map map);

    void updateIrCurveRefSet(Map map);

    void updateIrCurveRates(Map map);

    void insertIrCurveRefSetByDate(Map map);

    void insertIrCurveRefSet(Map map);

    void insertIrCurveRates(Map map);

    void deleteIrCurveRefSet(Map map);

    void deleteIrCurveRefSetByDate(Map map);

    void deleteIrCurveRates(Map map);

    void deleteAllIrCurveRefSet(Map map);

    void filterIrCurveRefSet(Map map);

    List<Map> queryFilterIrCurveRefSetByPage(Map map);

    int queryIrCurveRefSetByDate(Map map);

    void deleteIrCurveList(HashMap<String, Object> hashMap);

    void updateIrCurveByBegDate(HashMap<String, String> hashMap);

    String getNextDay(HashMap<String, Object> hashMap2);

    void insertIrCurveList(List<IrCurveDTO> list);

    void deleteIrCurveOne(Map map);

    Map getLastDay(HashMap<String, Object> map);

    void updateIrCurveRatesLastDay(Map map);

    Map getNextOne(HashMap<String, Object> map);

    IrCurveSetDTO getByIrcCode(String ircCode);

    String getDeptAncestors(String deptId);

    void batchInsertCurveUser(@Param("list")  List<IrCurveSetDTO> list );

    void batchInsertCurveDept(Map map);

    int removeUserPermCurve(Map map);

    int removeDeptPermCurve(Map map);

    void removeUserPermCurveByUserId(Map param);

    void removeDeptPermCurveByDeptId(Map param);

    void removeUserCurveByIrcCode(Map param);

    void removeDeptCurveByIrcCode(Map param);

    void updateUserPermCurve(Map<String, Object> params);

    void updateDeptPermCurve(Map<String, Object> params);

    String queryCurveFlagByUserId(String userId);


    List<Map> queryCurveDept(Map<String, Object> param);

    void saveCurveDept(Map<String, Object> param);

    void updateCurveDept(Map<String, Object> param);

    void deleteCurveDept(Map<String, Object> param);

    List<Map> queryCurveUserPerm(Map<String, Object> param);

    void saveCurveUser(Map<String, Object> param);

    void updateCurveUser(Map<String, Object> param);

    void deleteCurveUser(Map<String, Object> param);

    List<IrCurveSetDTO> checkIrCurve(Map<String, Object> map);

    void deleteAllIrcCurveRates(Map<String, Object> map);
}
